package world.xuewei.service;

import world.xuewei.model.entity.OrderItem;
import world.xuewei.model.entity.Orders;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;

import java.util.List;

/**
 * 订单主表(Orders)表服务接口
 *
 * @author makejava
 * @since 2024-11-16 15:40:07
 */
public interface OrdersService {

    // 创建订单
    String createOrder(Long userId,Long merchantId, Long addressId, String remark, Integer deliveryType, List<OrderItem> items);

    // 获取订单信息
    Orders getOrderDetail(String orderNumber);

    //获取用户订单
    List<Orders> getUserOrders(Long userId);

    // 查询商户的所有订单
    List<Orders> getMerchantOrders(Long userId);

    //支付订单
    void payOrder(String orderNumber);

    // 发货
    void shipOrder(String orderNumber, String courierName, String courierNumber);

    // 确认收货
    void confirmReceipt(String orderNumber);


    // 商家出餐
    void prepareMeal(String orderNumber);

    // 确认取餐
    void confirmPickup(String orderNumber);

    // 取消订单
    void cancelOrder(String orderNumber);


















}
